package com.crm.util;

import java.net.URL;

import org.apache.log4j.PropertyConfigurator;

public class LoggerUtil {
	public static final String LOGNAME="webcrm_log4j.properties";
	public static void setUpLog(String logName){
		//PropertiesConfigurator log4.properties
		if(logName==null) logName=LOGNAME;
		URL url = ApplicationContext.class.getClassLoader().getResource(logName);
		if(url==null)
		url=ApplicationContext.class.getClassLoader().getResource(logName);
		if(url == null){
			url=ApplicationContext.class.getResource(logName);
		}
	    PropertyConfigurator.configure(url);

	}
}
